package com.buba.springcloud.dao;

import com.buba.springcloud.entities.HfCoupon;
import com.buba.springcloud.entities.HfCouponReceiveRecord;
import com.buba.springcloud.entities.HfCouponUseRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author taodeyu
 * @Date 2022/1/6 下午 2:57
 * @Version 1.0
 */
@Mapper
public interface CouponMapper {

    List<HfCoupon> getAllCoupon();

    List<HfCouponReceiveRecord> getAllReceiveRecordByCoupon(@Param("id") Integer id);

    List<HfCouponUseRecord> getAllUseRecordByCoupon(@Param("id") Integer id);

    Integer saveCoupon(HfCoupon hfCoupon);

    Integer alterSwitch(HfCoupon hfCoupon);

    Integer updateCoupon(HfCoupon hfCoupon);
}